<template>
  <div class="fp-title">
    <div class="fp-title__left">
      <div class="fp-title__primary">
        <slot name="primary">
          {{ primary }}
        </slot>
      </div>
      <div class="fp-title__sub">
        <slot name="sub">
          {{ sub }}
        </slot>
      </div>
    </div>
    <div class="fp-title__right">
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    primary: String,
    sub: String
  },
  data() {
    return {}
  }
}
</script>

<style lang="less" scoped>
@import '~assets/main.less';
.fp-title {
  margin: @m / 2 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  @media screen and (max-width: 900px) {
    display: block;
    .fp-title__right {
      margin-top: @m / 2;
    }
  }
  .fp-title__primary {
    font-size: 22px;
    color: @c-label;
    display: inline-block;
  }
  .fp-title__sub {
    font-size: 16px;
    color: @c-label;
    font-weight: 300;
    margin-top: 2px;
  }
  .fp-title__right {
    > * {
      display: inline-block;
      margin-left: 5px;
    }
  }
}
</style>
